package com.primary.mappers;

import com.primary.controller.request.DonationcarsReqeust;
import com.primary.controller.request.DonationsitesRequest;
import com.primary.entity.Donationcars;
import com.primary.entity.Donationsites;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Mapper
@Repository
public interface DonationsitesMapper {
    /**
     * 用于分页显示信息
     * @param donationsitesRequest
     */
    List<Map<String, Object>> listByPage(DonationsitesRequest donationsitesRequest);

    /**
     * 插入一条数据
     * @param donationsites
     * @return
     */
    int insertOne(Donationsites donationsites);

    /**
     * 更新一条数据
     * @param donationsites
     * @return
     */
    int updateOneById(Donationsites donationsites);

    /**
     * 删除一条记录
     * @param id
     * @return
     */
    int deleteById(Integer id);

    /**
     * 方便前端选择信息
     * @return
     */
    List<String> querySitesForSelecter();

    /**
     * 选择血液来源，供前端使用
     *
     * @return
     */
    List<String> querySitesAndCarsForSelecter();
}
